# Contributor: Mikolaj Chwalisz <chwalisz@tkn.tu-berlin.de>
# Maintainer: Mikolaj Chwalisz <chwalisz@tkn.tu-berlin.de>
pkgname=libsmi
pkgver=0.5.0
pkgrel=4
pkgdesc="Library to access SMI management information"
url="https://www.ibr.cs.tu-bs.de/projects/libsmi/"
arch="all"
license="BSD-3-Clause AND MIT"
makedepends="$depends_dev"
subpackages="$pkgname-dev $pkgname-doc"
source="https://www.ibr.cs.tu-bs.de/projects/libsmi/download/libsmi-$pkgver.tar.gz
	gcc-14.patch"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--libexecdir=/usr/lib \
		--with-mibdir=/usr/share/libsmi/mibs \
		--with-pibdir=/usr/share/libsmi/pibs \
		--with-yangdir=/usr/share/libsmi/yang
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
be82e6b7054426e4634ac9d90467b89a51a9c836273c9d516f07ff3cec3a8dcc8b3bb0e0396d5facec3d9c952b17fb67f24ff2d3959e7e5cf9eced72023a0708  libsmi-0.5.0.tar.gz
c688fd6a028df22bb6aa703701d7959d2b6ea79f06e3c452515a2ce85a1a9f36612f2b4f80a78223375612dc65b606b760a4c1e84b20a2a559cf83d4320217e5  gcc-14.patch
"
